Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from Requires to extensions #81

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Switch from Requires to extensions #81

wants to merge 4 commits into from

Conversation

GiggleLiu
Copy link
Member

Added two extensions

  • TensorInferenceCUDAExt = "CUDA"
  • TensorInferenceGTNExt = "GenericTensorNetworks"

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Merging #81 (75a021f) into main (248bdb5) will decrease coverage by 0.41%.
Report is 1 commits behind head on main.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##             main      #81      +/-   ##
==========================================
- Coverage   84.70%   84.29%   -0.41%     
==========================================
  Files          10       10              
  Lines         536      535       -1     
==========================================
- Hits          454      451       -3     
- Misses         82       84       +2     
Files Coverage Δ
ext/TensorInferenceGTNExt.jl 90.90% <100.00%> (ø)
src/TensorInference.jl 100.00% <ø> (ø)
src/mar.jl 94.54% <100.00%> (ø)
ext/TensorInferenceCUDAExt.jl 0.00% <0.00%> (ø)
src/utils.jl 88.97% <0.00%> (-0.71%) ⬇️

@mroavi
Copy link
Collaborator

mroavi commented Sep 26, 2023

I had an issue trying to run the tests on my machine:

(TensorInference) pkg> test
julia> ERROR: Compat `CUDA` not listed in `deps` or `extras` section.

@GiggleLiu
Copy link
Member Author

GiggleLiu commented Sep 26, 2023

I had an issue trying to run the tests on my machine:

(TensorInference) pkg> test
julia> ERROR: Compat `CUDA` not listed in `deps` or `extras` section.

What is your Julia version? The extensions feature requires Julia > 1.9. CUDA is listed in weakdeps, however your Julia does not check this section.

@mroavi
Copy link
Collaborator

mroavi commented Sep 26, 2023

Hmm, I see. I have Julia 1.8.5 installed on my machine. Given the requirement for Julia > 1.9 for the extensions feature, should we consider dropping support for the 1.8.x versions? Or is there a workaround to make it compatible with Julia 1.8.x?

@GiggleLiu
Copy link
Member Author

GiggleLiu commented Sep 26, 2023

The backward compatibility is discussed here: https://pkgdocs.julialang.org/v1.9/creating-packages/#Backwards-compatibility

However, I am against using compatibility treatment. For some users who want to stick to older version Julia, they can use older version of TensorInference.

We can either merge this PR directly, or merge it after the next julia LTS release. The previous LTS version is 1.6.

@mroavi
Copy link
Collaborator

mroavi commented Sep 26, 2023

Since we are planning to drop support for older Julia versions, I propose that we merge this once the next LTS version is released. Is there any way we could improve the error message above? The current error message does not clearly indicate that TensorInference.jl does not support versions prior to 1.9, even though we have specified 'julia = "1.9"' in the Project file.

@GiggleLiu
Copy link
Member Author

Since we are planning to drop support for older Julia versions, I propose that we merge this once the next LTS version is released. Is there any way we could improve the error message above? The current error message does not clearly indicate that TensorInference.jl does not support versions prior to 1.9, even though we have specified 'julia = "1.9"' in the Project file.

I think the package simply does not appear in the General registry in julia version < 1.9. If you are using Julia 1.8, it will fetch older versions for you. FYI: I have droped <1.9 version support in the latest OMEinsum.

But I agree we should at least wait for 1.10 (not nessesaryly LTS), which is another significant improvement comparing with 1.9. Then more people will switch to newer version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants